1. Field of the Invention
Embodiments of the present invention generally relate to processors, and more specifically, a method and compiler for sharing data between processors.
2. Description of the Related Art
Central processing units (CPU's) are composed of multiple primitives that evaluate a portion of data stored in an associated discrete data memory. Collectively, the primitives enable the CPU to evaluate all of the data stored in the entire data memory. The primitives may be transistor-based primitives, as in the PENTIUM PROCESSOR, multiplexer-based primitives as utilized in the CADENCE PALLADIUM II hardware emulator, or any other type of primitive typically used in a CPU.
Each primitive has a certain number of inputs and each input is capable of receiving a data bit(s) from its associated discrete data memory. The primitive evaluates the data bits and produces one or more output bits. The output bit is usually stored back in the associated discrete data memory and may also be provided to another primitive or placed onto a communications bus for use by another portion of the CPU. The output bit may also be provided to a hardware device, i.e., a debugger, a VLSI circuit, etc., or a software application that can access the communications bus.
A primitive does not always require use of all its inputs when receiving data from its associated discrete data memory. For example, a primitive with four inputs may require only three inputs to evaluate the received data. The primitive will still receive four inputs from the data memory, however, one of the inputs will be designated as a “do not care” input and ignored by the primitive during evaluation of the data.
A conventional primitive has one input per read port on its associated discrete data memory. An increase in the number of inputs into the primitive results in a need for a corresponding increase in the number of data memory read ports. As the number of data memory read ports and primitive inputs increases, the manufacturing cost of the CPU greatly increases.
Thus, there is a need in the art for a method and apparatus that enables a first primitive to share input data with a second primitive when the first primitive does not need all of its inputs to access data from a data memory.